import 'package:flutter/cupertino.dart';
import 'package:xuance/constant.dart';

class CommonOutlinedButton extends StatelessWidget {
  final GestureTapCallback? onTap;
  final bool active;
  final String title;

  const CommonOutlinedButton(
      {super.key, this.onTap, required this.active, required this.title});

  @override
  Widget build(BuildContext context) {
    return GestureDetector(
      onTap: onTap,
      child: Container(
        padding: const EdgeInsets.symmetric(horizontal: 6, vertical: 3),
        decoration: BoxDecoration(
            borderRadius: br5,
            color: const Color(0xff1b3243),
            border:
                Border.all(color: active ? c_green : const Color(0xff9cabb7))),
        child: Text(title,
            style:
                TextStyle(color: active ? c_green : const Color(0xff9cabb7))),
      ),
    );
  }
}
